// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

// 全局引入router文件下index.js文件
import router from './router'
// element-ui库
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import * as echarts from 'echarts'
import * as ecStat from 'echarts-stat'
import 'echarts-gl'

// vant2库
import Vant from 'vant'
import 'vant/lib/index.css'

// Vue.prototype.$axios = axios


// 使用element-ui库
Vue.use(ElementUI)
Vue.prototype.$echarts = echarts
Vue.prototype.ecStat = ecStat

// 使用vant2库
Vue.use(Vant)

Vue.config.productionTip = false

/* eslint-disable no-new */
/* eslint-disable */
// 全局使用
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  beforeCreate() {
    Vue.prototype.$bus = this //安装全局事件总线，$bus就是当前应用的vm
  }
})
